package sample.chapter7.desending;

import java.util.NavigableSet;
import java.util.TreeSet;

/**
 * A sample class demonstrating descending order doesn't affect
 * the original object reference. 
 * 
 * @author kan.sun
 *
 */
public class Descending
{
	public static void main(String[] args)
	{
		NavigableSet<Integer> times = new TreeSet<Integer>();
		times.add(1205);
		times.add(1505);
		times.add(1545);
		times.add(1600);
		times.add(1830);
		times.add(2000);
		times.add(2010);
		times.add(2100);
		
		System.out.println("Original order: "+times);
		System.out.println("Desending order: "+times.descendingSet());
		System.out.println("Current order: "+times);
	}
}
